package digui;

public class Hannouta {
    public static void main(String[] args) {
        han(3, "左", "右", "中");
    }

    public static void han(int n, String start, String end, String temp){
        if(n == 1){
            System.out.println("将"+n+ "从" + start + "移动到" + end);
        }else{
            han(n-1, start, temp, end);
            System.out.println("将"+n+ "从" + start + "移动到" + end);
            han(n -1, temp, end,start);
        }
    }
}
